import { Component, Node, Prefab } from "cc";

export default class GameUtils {
  //数组随机排序
  public static randomSort(arr: Array<any>): Array<any> {
    for (var i = 0, len = arr.length; i < len; i++) {
      var rand = parseInt(Math.random() * len + "");
      var temp = arr[rand];
      arr[rand] = arr[i];
      arr[i] = temp;
    }
    return arr;
  }
}
